package com.yunhoo.checkFlow.db.impl;

import com.yunhoo.checkFlow.util.BillType;
import com.yunhoo.sys.db.util.IbatisTemplate;
import com.yunhoo.sys.util.common.LoginParam;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class CheckFlowImpl {

    private static final String NAMESPACE = "flowInfo.";

    /* 检查 审批流是否存在 */
    public static boolean checkFlowIsExists() {
        Map map = new HashMap();
        map.put("orgCode", LoginParam.getOrg().getCode());
        map.put("iyear", LoginParam.getIyear());
        map.put("type", BillType.CONTRACT_INPUT);
        
        List<String> flowModelList = IbatisTemplate.queryForList(NAMESPACE + "queryFlowModelList", map);
        if (flowModelList != null && !flowModelList.isEmpty()) {
            return true;
        }
        return false;
    }
}
